import SvgIcon from '@/components/SvgIcon/index.vue'
// 全局注册 icon 图标
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
const allGlobalComponents = { SvgIcon }

export default {
  install: (app: any) => {
    // 注册项目的全部全局组件
    Object.keys(allGlobalComponents).forEach((key) => {
      // 注册为全局组件
      app.component(key, allGlobalComponents[key])
      for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
        app.component(key, component)
      }
    })
  },
}
